# Train KRR on all AA and random WA (see `KRR_allAA_vs_randWA.md`)

## Create `sub_fold` structure for selected subjects

```matlab
proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
ABCD_create_subfold_allAA_randWA(...
    fullfile(proj_dir, 'scripts', 'lists', 'subjects_pass_rs_pass_pheno.txt'), ...
    fullfile(proj_dir, 'scripts', 'lists', 'behavior_list.txt'), ...
    fullfile(proj_dir, 'mat', 'matchANDsplit', '20200719'), ...
    '_pass_rs_pass_pheno')
```

## ------ KRR: regress age, sex, FD, DVARS, ICV, parental education from behaviors and RSFC ------

### Train KRR

```bash
../KRR/ABCD_KRR_reg_AgeSexMtIcvPEduc_y_FC_allAA_randWA.sh
```

### Test the all-AA + random-WA trained model with matched WA subjects

```bash
proj_dir=/home/jingweil/storage/MyProject/fairAI/ABCD_race
../KRR/ABCD_KRR_test_allAArandWAmodel_on_matchedWA.sh -model_dir \
  $proj_dir/models/KRR/20200721/reg_AgeSexMtIcvPEduc_y_FC_allAA_randWA -cfds_X_ls \
  /home/jingweil/storage/MyProject/fairAI/ABCD_race/scripts/lists/confounds_list.txt
```

### Test the all-AA + random-WA trained model with matched AA subjects

```bash
proj_dir=/home/jingweil/storage/MyProject/fairAI/ABCD_race
../KRR/ABCD_KRR_test_allAArandWAmodel_on_matchedAA.sh -model_dir \
  $proj_dir/models/KRR/20200721/reg_AgeSexMtIcvPEduc_y_FC_allAA_randWA -cfds_X_ls \
  /home/jingweil/storage/MyProject/fairAI/ABCD_race/scripts/lists/confounds_list.txt
```

### Using model trained on all AA and random WA, compare accuracy between matched AA and matched WA

1. metric: predictive COD

    Permutation test

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_PermTest_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_FC_allAA_randWA'), ...
        'matchedAA', 'AA', 'matchedWA', 'WA', [], 'predictive_COD', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'pCOD_allAArandWAmodel_reg_AgeSexMtIcvPEduc_y_FC_test_matchedAAvsWA.mat'))

    % behaviors that are predictable in the whole-population model
    ABCD_KRR_PermTest_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_FC_allAA_randWA'), ...
        'matchedAA', 'AA', 'matchedWA', 'WA', ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y_FC', 'lists', 'pCOD_predictable.txt'), ...
        'predictive_COD', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'pCOD_allAArandWAmodel_reg_AgeSexMtIcvPEduc_y_FC_test_matchedAAvsWA_predictable_WholepopModel.mat'))
    ```

    Plotting

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_whisker_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_FC_allAA_randWA'), ...
        'matchedAA', 'matchedWA', [], [], 'predictive_COD', ...
        'Matched AA vs WA (model trained on all AA + random WA)', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), ...
        'pCOD_allAArandWAmodel_reg_AgeSexMtIcvPEduc_y_FC_test_matchedAAvsWA', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'pCOD_allAArandWAmodel_reg_AgeSexMtIcvPEduc_y_FC_test_matchedAAvsWA.mat'))
    
    % behaviors that are predictable in the whole-population model
    ABCD_KRR_whisker_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_FC_allAA_randWA'), ...
        'matchedAA', 'matchedWA', ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y_FC', 'lists', 'pCOD_predictable.txt'), ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y_FC', 'lists', 'pCOD_predictable_colloquial.txt'), ...
        'predictive_COD', ...
        'Matched AA vs WA (model trained on all AA + random WA)', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), ...
        'pCOD_allAArandWAmodel_reg_AgeSexMtIcvPEduc_y_FC_test_matchedAAvsWA_predictable_WholepopModel', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'pCOD_allAArandWAmodel_reg_AgeSexMtIcvPEduc_y_FC_test_matchedAAvsWA_predictable_WholepopModel.mat'))
    ```

2. metric: Pearson's correlation

    Permutation test

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_PermTest_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_FC_allAA_randWA'), ...
        'matchedAA', 'AA', 'matchedWA', 'WA', [], 'corr', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'corr_allAArandWAmodel_reg_AgeSexMtIcvPEduc_y_FC_test_matchedAAvsWA.mat'))

    % behaviors that are predictable in the whole-population model
    ABCD_KRR_PermTest_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_FC_allAA_randWA'), ...
        'matchedAA', 'AA', 'matchedWA', 'WA', ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y_FC', 'lists', 'corr_predictable.txt'), ...
        'corr', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'corr_allAArandWAmodel_reg_AgeSexMtIcvPEduc_y_FC_test_matchedAAvsWA_predictable_WholepopModel.mat'))
    ```

    Plotting

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_whisker_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_FC_allAA_randWA'), ...
        'matchedAA', 'matchedWA', [], [], 'corr', ...
        'Matched AA vs WA (model trained on all AA + random WA)', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), ...
        'corr_allAArandWAmodel_reg_AgeSexMtIcvPEduc_y_FC_test_matchedAAvsWA', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'corr_allAArandWAmodel_reg_AgeSexMtIcvPEduc_y_FC_test_matchedAAvsWA.mat'))

    % behaviors that are predictable in the whole-population model
    ABCD_KRR_whisker_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_FC_allAA_randWA'), ...
        'matchedAA', 'matchedWA', ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y_FC', 'lists', 'corr_predictable.txt'), ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y_FC', 'lists', 'corr_predictable_colloquial.txt'), ...
        'corr', ...
        'Matched AA vs WA (model trained on all AA + random WA)', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), ...
        'corr_allAArandWAmodel_reg_AgeSexMtIcvPEduc_y_FC_test_matchedAAvsWA_predictable_WholepopModel', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'corr_allAArandWAmodel_reg_AgeSexMtIcvPEduc_y_FC_test_matchedAAvsWA_predictable_WholepopModel.mat'))
    ```


## ------ KRR: regress age, sex, FD, DVARS, ICV, parental education from behaviors ------

### Train KRR

```bash
../KRR/ABCD_KRR_reg_AgeSexMtIcvPEduc_y_allAA_randWA.sh
```

### Compare entire model performance: trainining on whole population VS training on allAA+randWA

```matlab
proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
ABCD_KRR_whisker_models_wholepop_vs_subgrp(...
    fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y'), ...
    fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), ...
    {'Whole-population model', 'All-AA + random-WA model', 'Difference'}, ...
    fullfile(proj_dir, 'figures', 'cmp_models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y', 'wholepop_vs_allAA_randWA'), ...
    fullfile(proj_dir, 'scripts', 'lists', 'behavior_list.txt'), ...
    fullfile(proj_dir, 'scripts', 'lists', 'colloquial_list.txt'))
```

### Test the all-AA + random-WA trained model with matched WA subjects

```bash
../KRR/ABCD_KRR_test_allAArandWAmodel_on_matchedWA.sh
```

### Compare accuracy of matched WA between models trained on whole population and trained on allAA+random WA

1. metric: predictive COD

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_whiskerYA_trainAll_vs_trainXA('All-AA & random-WA', 'WA', [], [], ...
        fullfile(proj_dir, 'mat', 'AAvsWA', 'pCOD_pass_rs_pass_pheno_reg_AgeSexMtIcvPeduc_fr_y.mat'), ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), 'predictive_COD', ...
        'Compare matched WA accuracy: whole-population trained VS all-AA + random-WA trained', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), 'pCOD_matchedWA_WholePopModel_vs_allAArandWAmodel')
    ```

2. metric: Pearson's correlation

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_whiskerYA_trainAll_vs_trainXA('All-AA & random-WA', 'WA', [], [], ...
        fullfile(proj_dir, 'mat', 'AAvsWA', 'corr_pass_rs_pass_pheno_reg_AgeSexMtIcvPeduc_fr_y.mat'), ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), 'corr', ...
        'Compare matched WA accuracy: whole-population trained VS all-AA + random-WA trained', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), 'corr_matchedWA_WholePopModel_vs_allAArandWAmodel')
    ```

3. metric: MSE
    
    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_whiskerYA_trainAll_vs_trainXA('All-AA & random-WA', 'WA', [], [], ...
        fullfile(proj_dir, 'mat', 'AAvsWA', 'MSE_pass_rs_pass_pheno_reg_AgeSexMtIcvPeduc_fr_y.mat'), ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), 'MSE', ...
        'Compare matched WA accuracy: whole-population trained VS all-AA + random-WA trained', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), 'MSE_matchedWA_WholePopModel_vs_allAArandWAmodel')
    ```

### Test the all-AA + random-WA trained model with matched AA subjects

```bash
../KRR/ABCD_KRR_test_allAArandWAmodel_on_matchedAA.sh
```

### Compare accuracy of matched AA between models trained on whole population and trained on allAA+random WA

1. metric: predictive COD

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_whiskerYA_trainAll_vs_trainXA('All-AA & random-WA', 'AA', [], [], ...
        fullfile(proj_dir, 'mat', 'AAvsWA', 'pCOD_pass_rs_pass_pheno_reg_AgeSexMtIcvPeduc_fr_y.mat'), ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), 'predictive_COD', ...
        'Compare matched AA accuracy: whole-population trained VS all-AA + random-WA trained', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), 'pCOD_matchedAA_WholePopModel_vs_allAArandWAmodel')
    ```

2. metric: Pearson's correlation

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_whiskerYA_trainAll_vs_trainXA('All-AA & random-WA', 'AA', [], [], ...
        fullfile(proj_dir, 'mat', 'AAvsWA', 'corr_pass_rs_pass_pheno_reg_AgeSexMtIcvPeduc_fr_y.mat'), ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), 'corr', ...
        'Compare matched AA accuracy: whole-population trained VS all-AA + random-WA trained', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), 'corr_matchedAA_WholePopModel_vs_allAArandWAmodel')
    ```

3. metric: MSE

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_whiskerYA_trainAll_vs_trainXA('All-AA & random-WA', 'AA', [], [], ...
        fullfile(proj_dir, 'mat', 'AAvsWA', 'MSE_pass_rs_pass_pheno_reg_AgeSexMtIcvPeduc_fr_y.mat'), ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), 'MSE', ...
        'Compare matched AA accuracy: whole-population trained VS all-AA + random-WA trained', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), 'MSE_matchedAA_WholePopModel_vs_allAArandWAmodel')
    ```

### Using model trained on all AA and random WA, compare accuracy between matched AA and matched WA

1. metric: predictive COD

    Permutation test

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_PermTest_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), ...
        'matchedAA', 'AA', 'matchedWA', 'WA', [], 'predictive_COD', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'pCOD_allAArandWAmodel_test_matchedAAvsWA.mat'))

    % behaviors that are predictable in the whole-population model
    ABCD_KRR_PermTest_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), ...
        'matchedAA', 'AA', 'matchedWA', 'WA', ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y', 'lists', 'pCOD_predictable.txt'), ...
        'predictive_COD', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'pCOD_allAArandWAmodel_test_matchedAAvsWA_predictable_WholepopModel.mat'))
    ```

    Plotting

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_whisker_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), ...
        'matchedAA', 'matchedWA', [], [], 'predictive_COD', ...
        'Matched AA vs WA (model trained on all AA + random WA)', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), ...
        'pCOD_allAArandWAmodel_test_matchedAAvsWA', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'pCOD_allAArandWAmodel_test_matchedAAvsWA.mat'))
    
    % behaviors that are predictable in the whole-population model
    ABCD_KRR_whisker_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), ...
        'matchedAA', 'matchedWA', ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y', 'lists', 'pCOD_predictable.txt'), ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y', 'lists', 'pCOD_predictable_colloquial.txt'), ...
        'predictive_COD', ...
        'Matched AA vs WA (model trained on all AA + random WA)', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), ...
        'pCOD_allAArandWAmodel_test_matchedAAvsWA_predictable_WholepopModel', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'pCOD_allAArandWAmodel_test_matchedAAvsWA_predictable_WholepopModel.mat'))
    ```

2. metric: Pearson's correlation

    Permutation test

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_PermTest_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), ...
        'matchedAA', 'AA', 'matchedWA', 'WA', [], 'corr', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'corr_allAArandWAmodel_test_matchedAAvsWA.mat'))

    % behaviors that are predictable in the whole-population model
    ABCD_KRR_PermTest_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), ...
        'matchedAA', 'AA', 'matchedWA', 'WA', ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y', 'lists', 'corr_predictable.txt'), ...
        'corr', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'corr_allAArandWAmodel_test_matchedAAvsWA_predictable_WholepopModel.mat'))
    ```

    Plotting

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_whisker_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), ...
        'matchedAA', 'matchedWA', [], [], 'corr', ...
        'Matched AA vs WA (model trained on all AA + random WA)', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), ...
        'corr_allAArandWAmodel_test_matchedAAvsWA', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'corr_allAArandWAmodel_test_matchedAAvsWA.mat'))

    % behaviors that are predictable in the whole-population model
    ABCD_KRR_whisker_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), ...
        'matchedAA', 'matchedWA', ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y', 'lists', 'corr_predictable.txt'), ...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_fr_y', 'lists', 'corr_predictable_colloquial.txt'), ...
        'corr', ...
        'Matched AA vs WA (model trained on all AA + random WA)', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), ...
        'corr_allAArandWAmodel_test_matchedAAvsWA_predictable_WholepopModel', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'corr_allAArandWAmodel_test_matchedAAvsWA_predictable_WholepopModel.mat'))
    ```

3. metric: MSE

    Permutation test

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_PermTest_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), ...
        'matchedAA', 'AA', 'matchedWA', 'WA', [], 'MSE', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'MSE_allAArandWAmodel_test_matchedAAvsWA.mat'))
    ```

    Plotting

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_whisker_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), ...
        'matchedAA', 'matchedWA', [], [], 'MSE', ...
        'Matched AA vs WA (model trained on all AA + random WA)', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), ...
        'MSE_allAArandWAmodel_test_matchedAAvsWA', ...
        fullfile(proj_dir, 'mat', 'AAvsWA_train_subpop', 'MSE_allAArandWAmodel_test_matchedAAvsWA.mat'))
    ```

4. metric: COD

    ```matlab
    proj_dir = '/home/jingweil/storage/MyProject/fairAI/ABCD_race';
    ABCD_KRR_whisker_trainXA_testYAvsZA(...
        fullfile(proj_dir, 'models', 'KRR', '20200721', 'reg_AgeSexMtIcvPEduc_y_allAA_randWA'), ...
        'matchedAA', 'matchedWA', [], [], 'COD', ...
        'Matched AA vs WA (model trained on all AA + random WA)', ...
        fullfile(proj_dir, 'figures', 'allAA_randWA_trained', 'KRR', '20200721'), ...
        'COD_allAArandWAmodel_test_matchedAAvsWA')
    ```
